package com.iuhao.order.feginclient.fallback;

import com.iuhao.order.feginclient.UserServiceClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by yanhao on 2018/10/30.
 */
@Component
public class UserServiceClientFallback implements UserServiceClient {

    /**
     * fegin远程调用服务失败时熔断处理
     *
     * @param name
     * @return
     */
    @Override
    public String sayHiFromClientOne(@RequestParam(value = "name") String name) {
        return "sorry" + name;
    }

    @Override
    public String getProductionModel() {
        return "sorry";
    }
}
